package com.iwdnb.gkgz.ui.job;

import java.util.Date;

import cn.hutool.core.date.DateUtil;
import com.iwdnb.gkgz.application.service.StockDayDataSerivce;
import com.iwdnb.gkgz.application.service.StockLimitUpService;
import com.iwdnb.job.annotation.Job;
import com.iwdnb.job.handler.BaseJobHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 股票今日信息持久化,含涨停板数据持久化
 */
@Slf4j
@Job(cron = "0 0 16 * * ?")
public class StockLimitUpTldFlagDeleteJob extends BaseJobHandler {

    @Autowired
    private StockLimitUpService stockLimitUpService;

    @Override
    public boolean doProcess(String parameter) {
        log.info("StockLimitUpTldFlagDeleteJob begin");
        Date beginDate = DateUtil.offsetDay(new Date(), -5);
        stockLimitUpService.setTldFlag(beginDate);
        log.info("StockLimitUpTldFlagDeleteJob end");
        return true;
    }
}
